package com.toolbox.req;

import com.toolbox.validation.group.CreateAction;
import com.toolbox.validation.group.UpdateAction;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * Description：
 * </p>
 *
 * @author Mango
 * @version v1.0.0
 * @date 2023-11-20 17:47
 * @see com.toolbox.req
 */
@Data
@ToString
@Accessors(chain = true)
@ApiModel("角色——请求数据")
public class InfraRoleReq {

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID", position = 100)
    @NotNull(message = "主键ID不能为空", groups = {UpdateAction.class})
    private Long id;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", position = 100)
    @NotBlank(message = "角色名称不能为空", groups = {CreateAction.class, UpdateAction.class})
    private String name;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", position = 100)
    private String description;

    /**
     * 菜单权限ID集合
     */
    @ApiModelProperty(value = "菜单权限ID集合", position = 100)
    private List<Long> menuIds;

}
